home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
BORL_TIP
/
TI100
/
TI343.ASC
< prev
next >
Wrap
Text File
|
1991-09-11
|
822b
|
67 lines
PRODUCT : TURBO PASCAL NUMBER : 343
VERSION : 2.00
OS : CP/M-80
DATE : November 4, 1986 PAGE : 1/1
TITLE : RELEASE UPDATE
This is a work-around for a problem in the Release procedure of
version 2.00 of Turbo Pascal. Use this procedure instead of
Release.
type
IntPtr = ^integer;
procedure NewRelease(OldHeapPtr : IntPtr);
var
I : integer;
X, Y : real;
begin
if HeapPtr < 0 then
X := 65536.0 + HeapPtr
else
X := HeapPtr;
I := Addr(OldHeapPtr^);
if I < 0 then
Y := 65536.0 + I
else
Y := I;
I := Round(X - Y);
FreeMem(OldHeapPtr, I);
end; { NewRelease }